package android.alliance.ads.actions;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;

public class OnClickAction {

	public Intent run(String target){
		
		String marketUrl = "";
		
		if(target.contains("http://www.")){
			marketUrl = target;
		} else {
			marketUrl = "market://details?id=" + target;	
		}
		
		Intent launchIntent = new Intent(Intent.ACTION_VIEW); 
		launchIntent.setData(Uri.parse(marketUrl)); 
		
		return launchIntent;
	}
}
